/**
 * 
 */
package com.brewdroid.db.dao;

import java.util.ArrayList;

import android.database.Cursor;

import com.brewdroid.db.DatabaseHelper;

/**
 * @author meeusen
 *
 */
public class StyleDAO {
	
	private static final String STYLES_SELECT_ALL="select * from style order by name"; 
	
	
	public static ArrayList<String> getAllStyles(DatabaseHelper db)
	{
		ArrayList<String> list = new ArrayList<String>();
		list.add("Select a style");
		Cursor c = db.getReadableDatabase().rawQuery(STYLES_SELECT_ALL, new String[]{});
		if(c.moveToFirst())
		{
			do{
				list.add(c.getString(1));
			}while(c.moveToNext());
		}
		return list;
	}
}
